
<jsp:include page="menu.jsp" ></jsp:include>
            <!-- 
       <div class="container">
		<div class="caption col-md-7"  aria-label="...">
		  <a href="VisitaEdit.jsp"><button type="button" class="btn btn-primary col-md-2">Nuevo</button></a>
		  <button type="button" class="btn btn-primary col-md-2">Editar</button>
		  <button type="button" class="btn btn-primary col-md-2" data-toggle="modal" data-target="#borrar">Borrar</button>

		  <div class="col-md-6">
		    <div class="input-group">
		      <input type="text" class="form-control" placeholder="Apellido...">
		      <span class="input-group-btn">
		        <button class="btn btn-default" type="button">Buscar</button>
		      </span>
		    </div>
		  </div>		  
	</div>-->
	
 <div id="page-wrapper">
             
		<p></p>
		<div class="ibody">			 
			<div class="jumbotron">
					<h1>Consulta de Morosos</h1>
			</div>
			<!-- <div class="container">
				<div class="caption col-md-7"  aria-label="...">
					  <a href="VisitaEdit.jsp"><button type="button" class="btn btn-primary col-md-2">Nuevo</button></a>
					  <button type="button" class="btn btn-primary col-md-2">Editar</button>
					  <button type="button" class="btn btn-primary col-md-2" data-toggle="modal" data-target="#borrar">Borrar</button>
			
					  <div class="col-md-5">
					    <div class="input-group">
					      <input type="text" class="form-control" placeholder="Apellido...">
					      <span class="input-group-btn">
					        <button class="btn btn-default" type="button">Buscar</button>
					      </span>
					    </div>
					  </div>  
				</div>
			</div>		-->	
			<div class="formGeneral" class="col-xs-12">		
				<form id ="fresidentes" name ="fresidentes" method="post" action="MorososBuscarServlet"   action="./">

					<label class="col-sm-1 control-label" name="lstipo">Residente:</label>

						<div class="col-sm-4 controls" selectContainer>
	
						    <select class="form-control" id="ltresidente" name="ltresidente">
								<option value="">TODOS</option>
								<%@page import="java.util.*, upc.condominio.modelo.Residente, etm.negocio.GestionResidente" %>
								<%
								GestionResidente negocio2 = new GestionResidente() ;
								Collection<Residente> arreglo2 = negocio2.listar() ;
								if(arreglo2 != null) { 
									for(Residente x : arreglo2) {
								%>
								<option value="<%= x.getIdResidente() %>"> <%= x.getNombres() + "," + x.getApePaterno() + " " + x.getApeMaterno() %> </option>
								<% 	}
								}
								%>
							</select>
	
						</div>

				    <label>
				    <input type="submit" class="btn btn-primary" name="button" id="button" value="Buscar" />
				    </label>
				  </p>							
				</form>		
				
				<div class="table-responsive">
						<table class="table table-bordered table-hover">
							<tr class="info">
								<th width="50" scope="col"># Cuota</th>
								<th width="200" scope="col">Residente</th>
								<th width="50" scope="col">Numero</th>
								<th width="60" scope="col">Vencimiento</th>
								<th width="120" scope="col">Concepto</th>
								<th width="80" scope="col">Importe</th>
								<th width="80" scope="col">Adeuda</th>
							</tr>
				
							
							<%@page import="java.util.*, upc.condominio.modelo.Morosos" %>
							<%
							Collection<Morosos> lista = (ArrayList<Morosos>)request.getAttribute("Morosos");
							if(lista != null) { 
							for(Morosos x : lista) {
							%>
							<tr>
							    <td><%=x.getIdCuota() %></td>
							    <td><%=x.getRsResidente().getNombres() + "," + x.getRsResidente().getApePaterno() + " " + x.getRsResidente().getApeMaterno()  %></td>
							    <td><%=x.getNumero() %></td>
							    <td><%=x.getVence() %></td>
							    <td><%=x.getConcepto() %></td>
							    <td><%=x.getImporte() %></td>
							    <td><%=x.getSaldo() %></td>
						  </tr>
							<% }  
						  } %>							
							
							
						</table>
					</div>				
					
			
			</div>
		</div>                    
    </div>
	         
             
             <!-- Modal -->
	<div class="modal fade" id="borrar" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	  <div class="modal-dialog">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="myModalLabel">Esta seguro de borrar el resgistro de Visita?</h4>
	      </div>
	      <div class="modal-body">
	        Al eliminar la visita no se podra recuperar posteriormente.
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
	        <button type="button" class="btn btn-primary">Borrar</button>
	      </div>
	    </div>
	  </div>
	</div>
	           
</body>
</html>        